// Import Vue
import Vue from 'vue'
// Import F7
import Framework7 from 'framework7'
// Import F7 Vue Plugin
import Framework7Vue from 'framework7-vue'
// Toast plugin
// import ToastForFramework7 from 'toast-for-framework7/toast'
// import ToastForFramework7Styles from 'toast-for-framework7/toast.css'
import ToastForFramework7 from './global/toast/framework7.toast'
import ToastForFramework7Styles from './global/toast/framework7.toast.css'

// Import F7 iOS Theme Styles
import Framework7Theme from 'framework7/dist/css/framework7.ios.css'
import Framework7ThemeColors from 'framework7/dist/css/framework7.ios.colors.css'
import Framework7Icons from 'framework7-icons/css/framework7-icons.css'

// utlis $
import './global/utils'

// Import App Component
import App from './app/app.vue'
// Import App Custom Styles
import AppStyles from './app/app.scss'

// Import routes
import routes from './routes'

// Init F7 Vue Plugin
Vue.use(Framework7Vue)

// Init App
new Vue({
  el: '#app',
  render: h => h(App),
  // Init Framework7 by passing parameters here
  framework7: {
    root: '#app',
    routes,
    // Any other parameters
    swipePanel: 'left',
    pushState: true, // If it is webapp, we can enable hash navigation
  },
  created() {
    // console.log('created')
  }
})

// Toast
window.toast = f7.toast('提示信息', '', {
  duration: 1500,
  onHide: () => {}
})

// Login
window.login = function () {

}
